﻿CREATE TABLE [dbo].[DanhMuc_NguoiDung] (
    [UserID]   INT            IDENTITY (1, 1) NOT NULL,
    [MaNV]     NVARCHAR (200) NULL,
    [TenNV]    NVARCHAR (200) NULL,
    [DoUuTien] INT            NULL,
    [MaPB]     VARCHAR (50)   NOT NULL,
    [MaChucVu] INT            NULL,
    [MatKhau]  VARBINARY (50) NULL,
    [ChuKy]    IMAGE          NULL,
    PRIMARY KEY CLUSTERED ([UserID] ASC),
    CONSTRAINT [FK_DanhMuc_NguoiDung_DanhMuc_ChucVu] FOREIGN KEY ([MaChucVu]) REFERENCES [dbo].[DanhMuc_ChucVu] ([MaChucVu]) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT [FK_DanhMuc_NguoiDung_DanhMuc_DoUuTien] FOREIGN KEY ([DoUuTien]) REFERENCES [dbo].[DanhMuc_DoUuTien] ([DoUuTien]) ON DELETE CASCADE ON UPDATE CASCADE,
    CONSTRAINT [FK_DanhMuc_NguoiDung_DanhMuc_PhongBan] FOREIGN KEY ([MaPB]) REFERENCES [dbo].[DanhMuc_PhongBan] ([MaPB]) ON DELETE CASCADE ON UPDATE CASCADE
);

